/*
 * Copyright 2008 Nathan C Jones
 * 
 * This file is part of Fivehundred.
 * 
 * Fivehundred is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Fivehundred is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * Fivehundred. If not, see <http://www.gnu.org/licenses/>. 
 */

package com.googlecode.fivehundred;

import java.awt.Color;
import java.awt.Container;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

import com.googlecode.fivehundred.ui.simple.GameBoard;


public class GameLauncher {

	public static void main(final String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				GameLauncher game = new GameLauncher();
				createAndShowGui(game);
			}

		});
	}

	private static void createAndShowGui(final GameLauncher g) {
		final JFrame frame = new JFrame("500 Deck");
		final Container contentPane = frame.getContentPane();

		GameBoard gameBoard = new GameBoard();
		contentPane.add(gameBoard);
		

//		contentPane.setOpaque(true);
		contentPane.setBackground(Color.green);
		
		frame.pack();
		frame.setLocationRelativeTo(null);
//		frame.setResizable(false);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}
